package com.example.controller.utils;


import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ProjectExceptionAdvice {

    @ExceptionHandler
    public R doException(Exception e){

        //打印到控制台
        e.printStackTrace();
        return new R(false,"服务器故障 请稍后再试！");
    }
}
